<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="keywords" content="${keyword}" />
	<meta http-equiv="description" content="${description}" /> 
	<title>${title}</title>
	<link href="../../themes/css/v1.0/css02.css" type="text/css"  rel="stylesheet" />
	<link href="../../themes/css/v1.0/headandfooter.css" type="text/css"  rel="stylesheet" />
	<script type="text/javascript" src="../../script/jquery.js"></script>
	<script type="text/javascript" src="../../script/PopBox.js"></script>
	<link href="../../themes/flexigrid/css/thickbox.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../../script/tueyeutiljs.js"></script>
	<script src="../../script/grid/thickbox.js" type="text/javascript"></script>
	
	
	<script type="text/javascript">
		
		var topicid = "${topicid}";
		var articleTopicId = "${articleTopicId}";
		
		$(document).ready(function(){
			dingOrCai(0) ; 
			initComments();
			initRightDiv();
			initClicknums();
		});
		function initClicknums(){
			$.ajax({ 
				url: '../../topics.do?action=getClickNums' ,
				type:'post', 
				dataType:'json', 
				data: 'topicId='+topicid +'&articleTopicId' + articleTopicId, 
				success:function(datas){
					$("#clicknums").html("点击数：" + datas.clickNums);
				}, 
				error:function() {} 
		    }); 
		}
		function initRightDiv(){
			//同专题文章;
			$.ajax({ 
				url: '../../topics.do?action=topicByArttype' ,
				type:'post', 
				dataType:'json', 
				data: 'topicId='+topicid +'&articleTopicId' + articleTopicId, 
				success:function(datas){
					var topics = datas.topics ;
					var addTitleHtml = "" ;
					var addDateHtml = "" ;
					for(var key in topics){
						addTitleHtml += "<li><a href='../../" + topics[key].topicTypeEn +"/"+topics[key].topicId+"/index.html'>"+topics[key].topicTitle+"</a></li>" ;
						addDateHtml += "<li><a href='#'>["+ (topics[key].date).substring(0,10) +"]</a></li>";
					}
					$("#topicArtTitle").html(addTitleHtml);
					$("#topicArtDate").html(addDateHtml);
				}, 
				error:function() {} 
		    }); 
			//编辑推荐;
			$.ajax({ 
				url: '../../topics.do?action=getHotTopic' ,
				type:'post', 
				dataType:'json', 
				data: 'topicId='+topicid  , 
				success:function(datas){
					var topics = datas.topics ;
					var addTitleHtml = "" ;
					var addDateHtml = "" ;
					for(var key in topics){
						addTitleHtml += "<li><a href='../../" + topics[key].topicTypeEn +"/"+topics[key].topicId+"/index.html'>"+topics[key].topicTitle+"</a></li>" ;
						//addTitleHtml += "<li><a href='#'>"+topics[key].topicTitle+"</a></li>" ;
						addDateHtml += "<li><a href='#'>["+ (topics[key].date).substring(0,10) +"]</a></li>";
					}
					$("#topicHotTitle").html(addTitleHtml);
					$("#topicHotDate").html(addDateHtml);
				}, 
				error:function() {} 
		    }); 
			//本周推荐  ;
			$.ajax({ 
				url: '../../topics.do?action=getWeekTopic' ,
				type:'post', 
				dataType:'json', 
				data: 'topicId='+topicid , 
				success:function(datas){
					var topics = datas.topics ;
					var addTitleHtml = "" ;
					var addDateHtml = "" ;
					for(var key in topics){
						addTitleHtml += "<li><a href='../../" + topics[key].topicTypeEn +"/"+topics[key].topicId+"/index.html'>"+topics[key].topicTitle+"</a></li>" ;
						//addTitleHtml += "<li><a href='#'>"+topics[key].topicTitle+"</a></li>" ;
						addDateHtml += "<li><a href='#'>["+ (topics[key].date).substring(0,10) +"]</a></li>";
					}
					$("#topicWeekTitle").html(addTitleHtml);
					$("#topicWeekDate").html(addDateHtml);
				}, 
				error:function() {} 
		    }); 
		}
		function initComments()
		{
			//var oldComment = $("#yhpl").html();
			$.ajax({ 
				url: '../../topicComment.do?action=getTopicCommentHtml' ,
				type:'post', 
				dataType:'json', 
				data: "topicId=" + topicid , 
				success:function(msg){
					var topicComments = msg.topicComments;
					var addHtml ="";
					var commentCount = 0;
					//if(topicComments.length >0){
					//	addHtml = "<p class='p11'>用户评论:</p>" ;
					//	addHtml += "<ul>";
					//}
					for(var key in topicComments)
					{
						commentCount ++ ;
						addHtml += "<li id='plqu-1' class='plqu-1'><div class='plqu-2'><div class='plqu-8'><img class='plqu-3' src='../../themes/images/ioc02.gif'  />";
						addHtml += "<p>" + topicComments[key].commentPeople + "</p></div><p class='plqu-4'>"+ (topicComments[key].SysTime).substring(0,10) +"&nbsp;&nbsp;" + commentCount + "楼</p><div class='plqu-5'><img class='plqu-6' src='../../themes/images/ioc3.gif' /><div class='plqu-7'><p>"+topicComments[key].content+"</p></div></div></div></li>";
						//<li id="plqu-1" class="plqu-1"><div class="plqu-2"><div class="plqu-8"><img class="plqu-3" src="img/ioc02.gif"  />
						//<p>TuEye网友</p></div><p class="plqu-4">2009-10-14&nbsp;&nbsp;1楼</p><div class="plqu-5"><img class="plqu-6"src="img/ioc3.gif" /><div class="plqu-7"><p>上一篇作品:看图煲汤之怎么煲鸡汤</p></div></div></div></li>
					}
					if(addHtml != ""){
						addHtml = "<p class='p11'>用户评论:</p><ul>" + addHtml + "</ul>";
					}
					$("#yhpl").html(addHtml);
				}, 
				error:function() {} 
		    }); 
				//if(oldComment == "")
				//{
				//	$("#yhpl").html("<p class='p11'>用户评论:</p>");
				//}
		}
		
		function clickbiaoqing(obj){  
         if(obj == 1){
          insertText(":bishi:");
         }else if(obj == 2){
          insertText(":chongbai:");
         }else if(obj == 3){
           insertText(":bucuo:");
         }else if(obj == 4){
           insertText(":bixue:");
         }else if(obj == 5){
           insertText(":naoni:");
         }else if(obj == 6){
          insertText(":dise:");
         }else if(obj == 7){
          insertText(":chaoxiao:");
         }else if(obj == 8){
          insertText(":buzhidao:");
         }else if(obj == 9){
          insertText(":kun:");
         }else if(obj == 10){
          insertText(":meideheng:");
         }else if(obj == 11){
          insertText(":weiqu:");
         }else if(obj == 12){
          insertText(":daxiao:");
         }else if(obj == 13){
          insertText(":daizi:");
         }else if(obj == 14){
          insertText(":youzai:");
         }else if(obj == 15){
          insertText(":paomeiyan:");
         }
       }
       function insertText(str){ 
          var att =  document.getElementById('commenttext').innerText; 
          document.getElementById('commenttext').innerText = att+str;
       }
       
       function sendSubmit(){
	   		var commentPeople = $('#commentPeople').val();
	   		var content = $('#commenttext').val();
		   	if(content.length == 0){
	          alert("评论内容不能为空");
	          $('#content').focus();
	          return;
	        }
	        var commentData = "commentPeople="+commentPeople+"&content="+content+"&topicid="+topicid;
	        $.ajax({ 
				url: '../../topicComment.do?action=addTopicComment' ,
				type:'post', 
				dataType:'json', 
				data: commentData , 
				//beforeSend: function() {$("<img src='"+getContext()+"/themes/themes1/images/spinner40.gif' border='0' />").appendTo("#plqu")},  
				success:submitSuccess, 
				error:function() {} 
				//async: false, 
		    }); 
       }
       
       function submitSuccess(obj){
        if(obj == 1){
          alert("发表成功！");
          initComments();
          getTopicComment();
          document.getElementById('commenttext').innerText = "";
        }else{
          alert("发表失败！");
        }
       }
       
      
        function getTopicComment(){
				$.ajax({ 
					url: '../../topicComment.do?action=getTopicCommentHtml' ,
					type:'post',  
					dataType:'json',  
					data: 'topicId='+topicid , 
					//beforeSend: function() {$("<img src='"+getContext()+"/themes/themes1/images/spinner40.gif' border='0' />").appendTo("#plqu")},  
					success:function(data){ 
           			
                    //alert("收藏成功！");
                 
                } , 
					error:function() { alert("出错啦！");} 
					//async: false,
		    	}); 
			}
        	function getTopicCommentHtml(obj){
	        	var continents = obj.topicComments;
	        	var topicCommendata = "";
	        	if(continents !=null){
	        		var count =continents.length;
			        for(var i=0;i<continents.length;i++){ 
				     topicCommendata+="<p class=\"p11\">用户评论:</p>"; 
				     topicCommendata+="<ul>";
				     topicCommendata+="<li id=\"plqu-1\" class=\"plqu-1\">";    
					 topicCommendata+="<div class=\"plqu-2\">";
					 topicCommendata+="<div class=\"plqu-8\"><img class=\"plqu-3\" src=\"../../themes/images/ioc02.gif\"  />";
					 topicCommendata+="<p>"+continents[i].commentPeople+"</p> </div>";
					 topicCommendata+="<p class=\"plqu-4\">"+continents[i].SysTime.substring(0, 19)+"&nbsp;&nbsp;"+(count-i)+"楼</p>";
					 topicCommendata+="<div class=\"plqu-5\">";
					 topicCommendata+="<img class=\"plqu-6\" src=\"../../themes/images/ioc3.gif\" />";
					 topicCommendata+="<div class=\"plqu-7\">";
					 //continents[i].upTopic
					 topicCommendata+="<p>"+continents[i].content+"</p><br/>";
					// topicCommendata+=continents[i].content;
					 topicCommendata+="</div> </div> </div> </li> </ul>";
			        }  
			    }else{
			    	topicCommendata+="<p class=\"p11\">用户评论:</p> <ul>";
				 	topicCommendata+=" <p style=\"padding:10px 0 0 60px; color:#666666\">暂无评论</p> </ul>";
			    } 
		       	$("#yhpl").empty();
		        $("#yhpl").append(topicCommendata);
        	}
        	getTopicComment();
        	
        	
        	function dingOrCai(type){
        		var datas = 0; 
        		if(type == "1" )
        			datas = 'topicId='+topicid + "&count=1";
        		else if(type == "2")
        			datas = 'topicId='+topicid + "&count=-1";
        		else 
        		    datas = 'topicId='+topicid + "&count=0";
        		$.ajax({ 
					url: '../../topicComment.do?action=isExistDingOrCai' ,
					type:'post',  
					dataType:'json',  
					data: datas , 
					//beforeSend: function() {$("<img src='"+getContext()+"/themes/themes1/images/spinner40.gif' border='0' />").appendTo("#plqu")},  
					success:function(data){ 
						$("#caiyixia").html(data.caiNum);//
						$("#dingyixia").html(data.dingNum);//
                    	//alert(data);//caiyixia ;caiyixia;
                	} , 
					error:function() { alert("出错啦！");} 
					//async: false,
		    	}); 
        	}
        	
	</script>
	
</head>

<body>
	<!--box开始-->
	<div id="box">
		<!--head开始-->
		<div id="head">
			<img style="float:left;" src="../../themes/images/tueye_logo.gif" alt="tueye_logo" title="tueye_logo"/>
			<!--nav开始-->
			<div id="nav">
				<ul>
					<li class="nav_02">首&nbsp;&nbsp;页</li>
					<li class="nav_02">时事新闻</li>
					<li class="nav_01">饭没了秀</li>
					<li class="nav_02">时尚生活</li>
					<li class="nav_02">搞笑贴图</li>
					<li class="nav_02">道听图说</li>
					<li class="nav_02">我行我秀</li>
					<li class="nav_02">变废为宝</li>
					<li class="nav_02">流年似水</li>
				</ul>
			</div>
			<div id="sub_nav">
				<p style=" position:absolute;top:86px; left:27px;">今日更新：${todayUNum}篇文章</p>
				<ul>
					<li><a href="#">明星</a></li>
					<li><a href="#">美女</a></li>
					<li><a href="#">汽车</a></li>
					<li><a href="#">猎奇</a></li>
					<li><a href="#">社会</a></li>
					<li><a href="#">搞笑</a></li>
					<li><a href="#">旅游</a></li>
					<li><a href="#">美食</a></li>
					<li><a href="#">居家</a></li>
				</ul>
			</div>
			<!--nav结束-->
		</div>
		<!--head结束-->
		<div id="main">
			<div>
				<ul class="li_01">
					<li>您当前位置&nbsp;&gt;&nbsp;</li>
					<li>${daohang}&nbsp;&gt;&nbsp;</li>
					<li><a href="#"></a>&nbsp;&gt;&nbsp;</li>
				</ul>
			</div>
			<div id="m_top">
				<p class="p1">煲汤专题</p><p class="p2">推荐：</p><p class="p3"><a href="#">看图煲汤之怎么煲鸡汤</a></p>
				<p class="p4"><a href="#">看图煲汤之怎么煲鸡汤</a></p>
			</div>
			<h1 class="h1">${pagetitle}</h1>
			<!--m_top结束-->
			<div id="m_main">
				<div id="contectheander">
					<div id="clicknums" style="display:inline;">点击数：${countnum}</div> &nbsp;&nbsp;&nbsp;&nbsp;发布日期: ${time} &nbsp;
					&nbsp;&nbsp;&nbsp;作者:${author}
					<a href="../../publish.do">
					<img style="position:absolute; top:200px; left:585px; border:0"
						src="../../themes/images/ic.gif" alt="我来发布"  title="我来发布"/>
					</a>
				</div>
				<div id="m_main-1">
					<p class="pfin">${overview}</p>
					<ul>
						${showmain}
					</ul>
				</div>
			</div>
			<div id="m_top1">
				${pagenum}
				<ul id="pos">
					<li><img class="img01" src="../../themes/images/ding.gif" alt="顶一下" title="顶一下" onclick="dingOrCai('1')"/><br /><p class="p12" id="dingyixia" >${dingyixia}</p></li>
					<li><img class="img01" src="../../themes/images/cai.gif"  alt="踩一下"  title="踩一下" onclick="dingOrCai('2')"/><br /><p class="p13" id="caiyixia" >${caiyixia}</p></li>
			    </ul>
			</div>
				<p class="p9">${upnext}</p>
 			<div id="plqu">
				<div id="yhpl"></div>
				
				<div id="fbqu">
					<p class="p11">发表评论:</p>
					<form style="padding:10px;">
						您可以给自己起个昵称：<input type="text" name="commentPeople" id="commentPeople" value="匿名网友">
					</form>
  					<div style="float:left; width:400px;">
					<form style="padding:0 10px; height:150px; width:384px;">
						<textarea style=" height:140px; width:384px;" name="commenttext" id="commenttext"></textarea>
					</form>
					<input type="button" value="提交评论" style="height=18px;width=35px; float:right;" id="commentsubmit" onclick="sendSubmit();"/></div>
					<div style="width:250px; float:right;">
					<ul>
						<li><img src="../../themes/images/1.gif"  width="50" height="50" id="bishi" alt="鄙视" title="鄙视" onclick="clickbiaoqing(1);"/></li>
						<li><img src="../../themes/images/2.gif" width="50" height="50" id="chongbai" alt="崇拜" title="崇拜" onclick="clickbiaoqing(2);"/></li>
						<li><img src="../../themes/images/3.gif" width="50" height="50" id="bucuo" alt="不错" title="不错" onclick="clickbiaoqing(3);"/></li>
						<li><img src="../../themes/images/4.gif" width="50" height="50" id="bixue" alt="鼻血" title="鼻血" onclick="clickbiaoqing(4);"/></li>
						<li><img src="../../themes/images/5.gif" width="50" height="50" id="naoni" alt="挠你" title="挠你" onclick="clickbiaoqing(5);"/></li>
						<li><img src="../../themes/images/6.gif" width="50" height="50" id="dise" alt="得瑟" title="得瑟" onclick="clickbiaoqing(6);"/></li>
						<li><img src="../../themes/images/7.gif" width="50" height="50" id="chaoxiao" alt="嘲笑" title="嘲笑" onclick="clickbiaoqing(7);"/></li>
						<li><img src="../../themes/images/8.gif" width="50" height="50" id="buzhidao" alt="不知道" title="不知道" onclick="clickbiaoqing(8);"/></li>
						<li><img src="../../themes/images/9.gif" width="50" height="50" id="kun" alt="困" title="大困" onclick="clickbiaoqing(9);"/></li>
						<li><img src="../../themes/images/10.gif" width="50" height="50" id="meideheng" alt="美得很" title="美得很" onclick="clickbiaoqing(10);"/></li>
						<li><img src="../../themes/images/11.gif" width="50" height="50" id="weiqu" alt="委屈" title="委屈" onclick="clickbiaoqing(11);"/></li>
						<li><img src="../../themes/images/12.gif" width="50" height="50" id="daxiao" alt="大笑" title="大笑" onclick="clickbiaoqing(12);"/></li>
						<li><img src="../../themes/images/13.gif" width="50" height="50" id="daizi" alt="呆子" title="呆子" onclick="clickbiaoqing(13);"/></li>
						<li><img src="../../themes/images/14.gif" width="50" height="50" id="youzai" alt="悠哉" title="悠哉" onclick="clickbiaoqing(14);"/></li>
						<li><img src="../../themes/images/15.gif" width="50" height="50" id="paomeiyan" alt="抛媚眼" title="抛媚眼" onclick="clickbiaoqing(15);"/></li>
					</ul>
					</div>
				</div>
			</div>
		</div>
		<!--main结束-->
		<div id="sub">
			<div id="column1">
				<img class="p6" src="../../themes/images/m_colum1-L.gif" />
				<div id="column1-1">
					<img class="p6" src="../../themes/images/m_colum1-C1.gif" />
					<h2>煲汤专题相关文章</h2>
					<ul style="float:left;" id="topicArtTitle">
						${xiangguan}
					</ul>
					<ul style="float:right;" id="topicArtDate">
						<li><a href="#">[2009- 9-10]</a></li>
 						<li><a href="#">[2009- 9-10]</a></li>
						<li><a href="#">[2009- 9-10]</a></li>
						<li><a href="#">[2009- 9-10]</a></li>
					</ul>
				</div>
				<img class="p6" src="../../themes/images/m_colum1-R.gif" />
			</div>
			<div id="column2">
				<img class="p6" src="../../themes/images/m_colum2-L.gif" />
				<div id="column2-1">
					<img class="p6" src="../../themes/images/m_colum2-C.gif" />
					<img class="p6" style="padding-top:3px;" src="../../themes/images/m_colum1-li3.gif" />
					<ul style="float:left; padding-left:5px;" id="topicHotTitle">
						<li><a href="#">看图煲汤之怎么煲鸡汤</a></li>        
                        <li><a href="#">看图做菜之怎么做牛奶白菜</a> </li>     
						<li><a href="#">看图煲汤之怎么煲鸡汤</a></li>        
                        <li><a href="#">看图做菜之怎么做牛奶白菜</a> </li>
						<li><a href="#">看图煲汤之怎么煲鸡汤</a></li>        
                        <li><a href="#">看图做菜之怎么做牛奶白菜</a> </li>
						<li><a href="#">看图煲汤之怎么煲鸡汤</a></li>         
                        <li><a href="#">看图做菜之怎么做牛奶白菜</a> </li>
						<li><a href="#">看图煲汤之怎么煲鸡汤</a></li>          
                        <li><a href="#">看图做菜之怎么做牛奶白菜</a> </li>
						<li><a href="#">看图煲汤之怎么煲鸡汤</a></li>          
                        <li><a href="#">看图做菜之怎么做牛奶白菜</a> </li>
					</ul>
					<ul style="float:right;"  id="topicHotDate">
						<li><a href="#">[2009- 9-10]</a></li>        
                        <li><a href="#">[2009- 9-10]</a></li>     
						<li><a href="#">[2009- 9-10]</a></li>        
                        <li><a href="#">[2009- 9-10]</a></li>
						<li><a href="#">[2009- 9-10]</a></li>        
                        <li><a href="#">[2009- 9-10]</a></li>
						<li><a href="#">[2009- 9-10]</a></li>         
                        <li><a href="#">[2009- 9-10]</a></li>
						<li><a href="#">[2009- 9-10]</a></li>          
                        <li><a href="#">[2009- 9-10]</a></li>
						<li><a href="#">[2009- 9-10]</a></li>          
                        <li><a href="#">[2009- 9-10]</a></li>
					</ul>
				</div>
				<img class="p6" src="../../themes/images/m_colum2-R.gif" />
			</div>
			<div id="column2">
				<img class="p6" src="../../themes/images/m_colum2-L.gif" />
				<div id="column2-1">
					<img class="p6" src="../../themes/images/m_colum3-C.gif" />
					<img class="p6" style="padding-top:3px;" src="../../themes/images/m_colum1-li3.gif" />
					<ul style="float:left; padding-left:5px;" id="topicWeekTitle">
						${top15}
					</ul>
					<ul style="float:right;" id="topicWeekDate">
					</ul>
				</div>
				<img class="p6" src="../../themes/images/m_colum2-R.gif" />
			</div>
		</div>
		<!--sub结束-->
		<div id="footer">
			<div>
				<a href="#">关于tueye</a>
				|
				<a href="#">免责声明</a>
				|
				<a href="#">网站地图</a>
				|
				<a href="#">网站建设</a>
				|
				<a href="#">意见反馈</a>
				|
				<a href="#">友情链接</a>
				|
				<a href="#">联系我们</a>
				<br/>
				不良信息举：QQ 111111111 举报邮箱:superyuyue@126.com
				<br/>
				&copy; 2009 www.tueye.com, All Rights Reserved. 备案号
				<br/>
				<img src="../../themes/images/footer_icon.gif" />
			</div>
		</div>
	</div>
	<!--box结束-->
</body>
</html>